package cn.bigcontainer.alt.meta.exception;

import cn.bigcontainer.alt.common.exception.BigException;
import cn.bigcontainer.alt.common.exception.BigResultCode;

public class MException extends BigException {

    public MException() {
    }

    public MException(BigResultCode code, Object... args) {
        super(code, args);
    }

    public MException(Throwable cause, BigResultCode code, Object... args) {
        super(cause, code, args);
    }

    public final static BigResultCode ERR_RELATION_FORMAT = new BigResultCode(33, "关系的格式不正确：%s！");
    public final static BigResultCode ERR_RELATION_TYPE = new BigResultCode(34, "不支持的关系类型：%s！");

    public final static BigResultCode COLUMN_NULL = new BigResultCode(1000, "列[%s]不能为空！");
    public final static BigResultCode APP_CHILD = new BigResultCode(1001, "创建WO_APPS子类对象失败！");
    public final static BigResultCode VIEW = new BigResultCode(1401, "视图%s不存在！");
    public final static BigResultCode APP_VIEW = new BigResultCode(1402, "应用%s的%s视图id为空！");
    public final static BigResultCode CRUD_VW = new BigResultCode(1002, "[%s]视图ID不能为空！");
    public final static BigResultCode CRUD_NOVW = new BigResultCode(1003, "[%s]视图不存在！");
    public final static BigResultCode METHOD_ONLY_CHILD = new BigResultCode(1004, "方法[%s]仅子类才能调用哦！");
    public final static BigResultCode FIELD_VALUE = new BigResultCode(1005, "获取字段[%s]的值出错！");
    public final static BigResultCode PROP_ERR = new BigResultCode(1006, "未获取到对象[%s]的属性[%s]！");
    public final static BigResultCode PROP_VALUE = new BigResultCode(1035, "属性[%s]的值不能为空！");
    public final static BigResultCode RELATION_PROPS = new BigResultCode(1007, "关系[%s]中的本方属性[%s]设置不正确！");
    public final static BigResultCode RELATION_RELATEDPROPS = new BigResultCode(1008, "关系[%s]中的被关联方属性[%s]设置不正确！");
    public final static BigResultCode RELATION_BRIDGEPROPS = new BigResultCode(1009, "关系[%s]中的关系对象属性[%s]设置不正确！");
    public final static BigResultCode VIEWPROP_PROP_NULL = new BigResultCode(1010, "[%s]视图属性[%s]的属性没有设置！");
    public final static BigResultCode VIEWPROP_PROP_ERR = new BigResultCode(1011, "[%s]视图属性[%s]的属性设置错误！");
    public final static BigResultCode VIEW_PK = new BigResultCode(1012, "[%s]视图[%s]未完全包含对象的主键属性！");
    public final static BigResultCode PK_TYPE = new BigResultCode(1013, "主键[%s]未设置匹配的生成器！");
    public final static BigResultCode PK_VALUE = new BigResultCode(1014, "[%s]的主键值不能为空！");
    public final static BigResultCode PK_NUM = new BigResultCode(1015, "[%s]的主键个数和值[%s]不匹配！");
    public final static BigResultCode VIEW_PR = new BigResultCode(1016, "视图属性[%s]的关系和属性不匹配！");
    public final static BigResultCode VIEW_RV = new BigResultCode(1017, "视图属性[%s]的关系属性和值的个数不匹配！");
    public final static BigResultCode VIEW_VALUE = new BigResultCode(1018, "视图属性[%s]的值不能为空！");
    public final static BigResultCode VIEW_P = new BigResultCode(1019, "属性[%s]未在视图中配置！");
    public final static BigResultCode OBJ_R = new BigResultCode(1020, "对象[%s]的关系[%s]不存在！");
    public final static BigResultCode OBJ_ID = new BigResultCode(1021, "[%s]的ID不能为空！");
    public final static BigResultCode OBJ_QRY = new BigResultCode(1022, "未查询到对象[%s]，ID[%s]！");
    public final static BigResultCode SPROP = new BigResultCode(1023, "特殊属性参数[%s]未设置！");
    public final static BigResultCode APP_NO = new BigResultCode(1024, "应用[%s]不存在！");
    public final static BigResultCode VIEW_PROP = new BigResultCode(1025, "未查询到属性[%s]对应的视图属性！");
    public final static BigResultCode OBJ_NAME = new BigResultCode(1026, "未查询对象[%s]名称属性的值！");
    public final static BigResultCode VIEWPROP_R_ERR = new BigResultCode(1027, "[%s]视图属性[%s]的关系未设置或者设置错误！");
    public final static BigResultCode VIEWPROP_R_DENY = new BigResultCode(1037, "表单视图属性[%s]的关系类型不允许！");
    public final static BigResultCode OBJ_CRUD = new BigResultCode(1028, "未查询到对象[%s]的crud！");
    public final static BigResultCode UK_INSERT_CONTAINS = new BigResultCode(1029, "插入[%s]的数据未包含所有唯一键值！");
    public final static BigResultCode UK_INSERT_CONSTRAINTS = new BigResultCode(1030, "插入[%s]的数据违反唯一性约束！");
    public final static BigResultCode UK = new BigResultCode(1034, "对象[%s]没有设置唯一键！");
    public final static BigResultCode NO_PARENT = new BigResultCode(1031, "对象[%s]未配置自关联多对一关系！");
    public final static BigResultCode NO_PARENT_VAL = new BigResultCode(1032, "对象[%s]的上级编号属性值为空！");
    public final static BigResultCode R_12M_DATA = new BigResultCode(1033, "该对象已经被[%s]的数据关联！");
    public final static BigResultCode FP_RELATION = new BigResultCode(1036, "更新关联对象[%s]的属性值时，未配置其关系对应的表单视图属性！");
    public final static BigResultCode RELATION_VAL_FMT = new BigResultCode(1037, "值格式不正确，正确格式：表名:值！");
    public final static BigResultCode APP_TYPE = new BigResultCode(1038, "应用类型不是%s！");
    
    public final static BigResultCode PROP_OBJ = new BigResultCode(1100, "属性[%s]的对象不能为空！");
    public final static BigResultCode PROP_LEN = new BigResultCode(1101, "文本或者整数属性[%s]的长度不能为空！");
    public final static BigResultCode PROP_PRECISION = new BigResultCode(1102, "获取数字属性[%s]的总位数出错！");
    public final static BigResultCode PROP_SCALE = new BigResultCode(1103, "获取数字属性[%s]的小数位数出错！");
    public final static BigResultCode PROP_FORMAT = new BigResultCode(1104, "关系格式不正确！");

    public final static BigResultCode META_SAVE = new BigResultCode(1200, "属性格式不正确！正确的格式为：data.abc");
    public final static BigResultCode META_DETELE = new BigResultCode(1201, "属性格式不正确！正确的格式为：data.abc");
    public final static BigResultCode META_ADD = new BigResultCode(1202, "属性格式不正确！正确的格式为：data.abc");
    public final static BigResultCode META_CONFIG = new BigResultCode(1203, "属性配置格式不正确！正确的格式为：key1:value1,key2:value2");
    public final static BigResultCode META_DEL_VP = new BigResultCode(1204, "该视图属性不允许删除！");
    
    public final static BigResultCode OI_RELATION = new BigResultCode(1230, "ObjectInputor未配置关系或者searchUrl！");
    public final static BigResultCode OI_RELATION2 = new BigResultCode(1231, "ObjectInputor未配置关系或者dataUrl！");
    
    public final static BigResultCode BIZ_PROP = new BigResultCode(1250, "请选择属性！");
    public final static BigResultCode BIZ_VISIBLE = new BigResultCode(1251, "该操作将导致视图[%s]无可见的元素，故不能执行！");
    public final static BigResultCode BIZ_CREATED = new BigResultCode(1252, "视图属性已经关联关系或属性%s！");
    
    public final static BigResultCode DIC_NAMEVALUE = new BigResultCode(1300, "数据字典名值个数不一致！");
    public final static BigResultCode DIC_TYPE = new BigResultCode(1301, "类型为%s的数据字典不存在！");
    
    public final static BigResultCode CALENDAR_APP_TYPE = new BigResultCode(1350, "日历应用的子应用不支持%s！");
}
